{% extends "menu.html" %}
{% block content %}

        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">
            <div class="page-title">



            </div>
            <div class="clearfix"></div>
            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2>SaltStack管理</h2>

                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
                    <br />
                    <style>
                      /*自己调整宽度*/
                      .tab-wraped > li ul {
                        width: 140px;
                      }
                      .tab-wraped > li ul label {
                        width: 50px!important;
                      }
                    </style>
                    <ul class="sui-nav nav-tabs tab-wraped">
                      <li class="active">
                          <a href="#index1" data-toggle="tab">
                          <h3>显示所有minion的认证信息</h3></a></li>
                      <li><a href="#index4" data-toggle="tab">
                          <h3>允许所有主机认证</h3></a></li>

                      <li><a href="#index3" data-toggle="tab">
                          <h3>SaltStack修改授权模块</h3></a></li>
                      <li><a href="#index2" data-toggle="tab">
                          <h3>自定义命令</h3></a></li>


                    </ul>
                    <div class="tab-content tab-wraped">
                        <div id="index1" class="tab-pane active">
                          <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left" method="post">
                        {% csrf_token %}
                              <div class="form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">功能<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" id="first-name" required="required" class="form-control col-md-7 col-xs-12" name="fun_num" value="1" readonly>
                                </div>
                              </div>
                              <div class="form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">执行命令<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" id="first-name" required="required" class="form-control col-md-7 col-xs-12" name="cmd" value="salt-key -L" readonly>
                                </div>
                              </div>
                              <div class="form-group">
                                <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                                  <button class="btn btn-primary" type="button">Cancel</button>
                                  <button class="btn btn-primary" type="reset">Reset</button>
                                  <button type="submit" class="btn btn-success">Submit</button>
                                </div>
                              </div>
                          </form>
                          <span >{{ result1|linebreaksbr }}</span>
                      </div>
                        <div id="index4" class="tab-pane">
                        <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left" method="post">
                        {% csrf_token %}
                            <div class="form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">功能<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" id="first-name" required="required" class="form-control col-md-7 col-xs-12" name="fun_num" value="4" readonly>
                                </div>
                              </div>
                              <div class="form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">cmd<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" id="first-name" required="required" class="form-control col-md-7 col-xs-12" name="cmd" value="salt-key -A -y"  readonly>
                                </div>
                              </div>

                              <div class="form-group">
                                <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                                  <button class="btn btn-primary" type="button">Cancel</button>
                                  <button class="btn btn-primary" type="reset">Reset</button>
                                  <button type="submit" class="btn btn-success">Submit</button>
                                </div>
                              </div>
                          </form>

                            <span>{{ result4 |linebreaksbr}}</span>
                      </div>
                        <div id="index2" class="tab-pane">
                        <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left" method="post">
                        {% csrf_token %}
                            <div class="form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">功能<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" id="first-name" required="required" class="form-control col-md-7 col-xs-12" name="fun_num" value="2" readonly>
                                </div>
                              </div>
                              <div class="form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">cmd<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" id="first-name" required="required" class="form-control col-md-7 col-xs-12" name="cmd" >
                                </div>
                              </div>

                              <div class="form-group">
                                <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                                  <button class="btn btn-primary" type="button">Cancel</button>
                                  <button class="btn btn-primary" type="reset">Reset</button>
                                  <button type="submit" class="btn btn-success">Submit</button>
                                </div>
                              </div>
                          </form>

                            <span>{{ result2 |linebreaksbr}}</span>
                      </div>
                        <div id="index3" class="tab-pane">
                        <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left" method="post">
                        {% csrf_token %}
                            <div class="form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">功能<span class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="text" id="first-name" required="required" class="form-control col-md-7 col-xs-12" name="fun_num" value="3" readonly>
                                </div>
                              </div>
                              <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name"> cmd<span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <select style="width: 60%;height:auto;font-size: 15px" size="10" name="s_cmd"  multiple>
                              {% for cmd in cmd_list %}
                              <option value="{{ cmd.id }}">{{ cmd.cmd_command }}</option>
                              {% endfor %}
                          </select>
                        </div>
                      </div>

                              <div class="form-group">
                                <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                                  <button class="btn btn-primary" type="button">Cancel</button>
                                  <button class="btn btn-primary" type="reset">Reset</button>
                                  <button type="submit" class="btn btn-success">Submit</button>
                                </div>
                              </div>
                          </form>

                            <span>{{ result2 |linebreaksbr}}</span>
                      </div>

                    </div>


                  </div>
                </div>
              </div>
            </div>


          </div>
        </div>
{% endblock %}